#ifndef CLICK_IGMPREPORTMESSAGE_H
#define CLICK_IGMPREPORTMESSAGE_H
#include "igmpstate.hh"

CLICK_DECLS

/** \brief Group record, the network representation of a state (see rfc3376 4.2)
 *
 */
struct IGMPGroupRecord {
    uint8_t recordType;
    uint8_t auxDataLength;
    uint16_t numberOfSources;
    in_addr multicastAddress;
    in_addr sourceAddressList[];
};

/** \brief Defines the "Membership Report Message" format for IGMPv3 (p.13 in rfc3376)
 * 
 */
struct MembershipReportMessage{
	uint8_t type;
	uint8_t reserved8;
	uint16_t checksum;
	uint16_t reserved16;
	uint16_t nogr;
	IGMPGroupRecord grouprecords[]; //grouprecords are of variable size, so grouprecords[0] will be a valid pointer, any other array index will be invalid.
};

CLICK_ENDDECLS

#endif
